﻿/**
 * ColorMunch 1.0: AS3 library for the Adobe Kuler API (http://code.google.com/p/colormunch/)
 *
 * ColorMunch is (c) 20009 Ben Kanizay
 * This software is released under the MIT License (http://www.opensource.org/licenses/mit-license.php)
 *
 */

/**
 * @author Ben Kanizay (http://beekay.biz)
 */

package beekay.colormunch {

	/**
	 * Holds Kuler theme comment data
	 * 
	 */
	public class Comment {

		private var comment:String;
		private var author:String;
		private var postedAt:String;
		private var posted:Date;

		/**
		 * Creates a new Comment
		 * @param comment  The comment text
		 * @param author  The comment author name
		 * @param postedAt  The date the comment was posted
		 * @constructor
		 */
		public function Comment(comment:String, author:String, postedAt:String) {
			this.comment = comment;
			this.author = author;
			this.postedAt = postedAt;
			this.posted = new Date(postedAt);
		}
		

		/**
		 * Get the comment text
		 * 
		 * @return Comment
		 * 
		 */
		public function getComment() : String {
			return this.comment;
		}

		/**
		 * Get the comment's author
		 * 
		 * @return Author name
		 * 
		 */
		public function getAuthor() : String {
			return this.author;
		}

		/**
		 * Get the comment post date as a Date object
		 * 
		 * @return The date the comment was posted
		 * 
		 */
		public function getPostedDate() : Date {
			return this.posted;
		}

		/**
		 * Get the comment post date as a simple string mm/dd/yyyy
		 * 
		 * @return The date the comment was posted
		 * 
		 */
		public function getPostedAt() : String{
			return this.postedAt;
		}

	}
}
